package com.cipe.cmrs.bean;

import java.io.Serializable;

public class LinkRoleEntryBean implements Serializable {
		
	/**
	 * 
	 */
	private static final long serialVersionUID = -449625754473508283L;
	private Integer id;
	private Integer linkId;
	private boolean hasRole;
	
	public LinkRoleEntryBean(Integer id, Integer linkId, boolean hasRole) {
		super();
		this.id = id;
		this.linkId = linkId;
		this.hasRole = hasRole;
	}
	
	public LinkRoleEntryBean() {
		super();
	}	

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getLinkId() {
		return linkId;
	}

	public void setLinkId(Integer linkId) {
		this.linkId = linkId;
	}	

	public boolean getHasRole() {
		return hasRole;
	}

	public void setHasRole(boolean hasRole) {
		this.hasRole = hasRole;
	}	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((linkId == null) ? 0 : linkId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LinkRoleEntryBean other = (LinkRoleEntryBean) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (linkId == null) {
			if (other.linkId != null)
				return false;
		} else if (!linkId.equals(other.linkId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return id + "-" + linkId;
	}	
}
